#include <stdio.h>  
#include <stdlib.h>  
#include <stddef.h>  
#include <stdarg.h>  
#include <string.h>  
#include <assert.h>  
#include <hiredis/hiredis.h>  

#define MANAGER_CONF_REDIS_TIMEOUT      15  //15 SECONDS

#define MANAGER_CONF_REPLY_RESULT       999
#define MANAGER_CONF_DEVICE_BASE        0
#define MANAGER_CONF_DEVICE_PROTO       1
#define MANAGER_CONF_STADEV_PROTO       2  //INCLUDE stadev strtagey and proto strtagey.
#define MANAGER_CONF_HPDEV_STATUS       3
#define MANAGER_CONF_WLANSDEV_STATUS    4
#define MANAGER_RUN_CMD_DEV             5

#define MANAGER_CONF_MAN_REDIS_L         "man_conf_l"  //运行与管理中心的管理系统与管理中心程序转换程序交互的list名
#define MANAGER_CON_DEV_REDIS_L          "dev_conf_l"

#define MANAGER_CONF_MAN_REDIS_L_RES         "man_conf_l_r"  //运行与管理中心的管理系统与管理中心程序转换程序交互的list名
#define MANAGER_CON_DEV_REDIS_L_RES          "dev_conf_l_r"

/*should read from manager config*/
#define MANAGER_CONF_MAN_REDIS_IP   "127.0.0.1" //DEFAULT VAL
#define MANAGER_CONF_MAN_REDIS_PORT     6379   //DEFAULT VAL

/*should read from DEV config */
#define MANAGER_CONF_DEV_REDIS_IP   "127.0.0.1" //DEFAULT VAL
#define MANAGER_CONF_DEV_REDIS_PORT     6379   //DEFAULT VAL 


extern char * blpopDevConf(redisContext * redis_cli);
extern char * blpopSmanConf(redisContext * redis_cli);
extern char * blpopDevConfR(redisContext * redis_cli);
extern char * blpopSmanConfR(redisContext * redis_cli);